import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
import { useState } from "react";
import { useExternal } from "ahooks";
function useExternal2(path, option) {
    var _useState = _sliced_to_array(useState(path), 2), realPath = _useState[0], setPath = _useState[1];
    var status = useExternal(realPath, option);
    var unmount = function() {
        setPath("");
    };
    var reload = function() {
        unmount();
        setPath(path);
    };
    return {
        status: status,
        unmount: unmount,
        reload: reload
    };
}
export default useExternal2;

 //# sourceMappingURL=useExternal2.js.map